package reflect;

/**
 * @author yuisama
 * @version 1.0.0
 * @Description 使用Student测试反射
 * @createTime 2023年04月11日 20:46:00
 */
public class Student {
    private String name;
    public int age;

    public Student() {
        System.out.println("Student类的无参构造");
    }

    Student(String name) {
        System.out.println("Student的一个参数的有参构造");
    }

    private Student(String name,int age) {
        this.name = name;
        this.age = age;
        System.out.println("Student类的有参构造");
    }

    public void fun(int[] arr) {
        System.out.println("public权限的成员方法 fun");
    }

    private String getName() {
        return this.name;
    }

    public static void test() {
        System.out.println("Student的静态方法test");
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
